Skip to content

logging: Integrate score_log#73

Open
prabakaranklst wants to merge 1 commit intoeclipse-score:mainfrom
qorix-group:prabakaran_integrate_score_log
Open

logging: Integrate score_log#73
prabakaranklst wants to merge 1 commit intoeclipse-score:mainfrom
qorix-group:prabakaran_integrate_score_log

Conversation

@prabakaranklst
Copy link
Contributor

Integrated score_log under score-log feature with appropriate refactoring in the source code.

Notes for Reviewer

Pre-Review Checklist for the PR Author

  • PR title is short, expressive and meaningful
  • Commits are properly organized
  • Relevant issues are linked in the References section
  • Tests are conducted
  • Unit tests are added

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Unit tests have been written for new behavior
  • Public API is documented
  • PR title describes the changes

Post-review Checklist for the PR Author

  • All open points are addressed and tracked via issues

References

Closes #67

@github-actions
Copy link

github-actions bot commented Mar 13, 2026

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.3.0) and connecting to it...
INFO: Invocation ID: 41dacaf6-1019-41e8-ab0f-950b6ee92965
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
WARNING: For repository 'rules_python', the root module requires module version rules_python@1.4.1, but got rules_python@1.8.3 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'bazel_skylib', the root module requires module version bazel_skylib@1.7.1, but got bazel_skylib@1.8.2 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'rules_cc', the root module requires module version rules_cc@0.1.1, but got rules_cc@0.2.16 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'aspect_rules_lint', the root module requires module version aspect_rules_lint@1.0.3, but got aspect_rules_lint@2.0.0 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'buildifier_prebuilt', the root module requires module version buildifier_prebuilt@7.3.1, but got buildifier_prebuilt@8.2.0.2 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'score_rust_policies', the root module requires module version score_rust_policies@0.0.3, but got score_rust_policies@0.0.5 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 3 packages loaded
Loading: 3 packages loaded
    currently loading: 
Loading: 3 packages loaded
    currently loading: 
Loading: 3 packages loaded
    currently loading: 
Loading: 3 packages loaded
    currently loading: 
Loading: 3 packages loaded
    currently loading: 
Loading: 3 packages loaded
    currently loading: 
Analyzing: target //:license-check (4 packages loaded, 0 targets configured)
Analyzing: target //:license-check (4 packages loaded, 0 targets configured)

Analyzing: target //:license-check (40 packages loaded, 9 targets configured)

Analyzing: target //:license-check (86 packages loaded, 9 targets configured)

Analyzing: target //:license-check (88 packages loaded, 9 targets configured)

Analyzing: target //:license-check (91 packages loaded, 9 targets configured)

Analyzing: target //:license-check (155 packages loaded, 1495 targets configured)

Analyzing: target //:license-check (156 packages loaded, 3085 targets configured)

Analyzing: target //:license-check (167 packages loaded, 3248 targets configured)

Analyzing: target //:license-check (167 packages loaded, 3250 targets configured)

Analyzing: target //:license-check (167 packages loaded, 3250 targets configured)

Analyzing: target //:license-check (171 packages loaded, 5263 targets configured)

Analyzing: target //:license-check (171 packages loaded, 5263 targets configured)

INFO: Analyzed target //:license-check (172 packages loaded, 5389 targets configured).
INFO: From Generating Dash formatted dependency file ...:
INFO: Successfully converted 213 packages from Cargo.lock to bazel-out/k8-fastbuild/bin/formatted.txt
[15 / 17] [Prepa] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar
[16 / 17] Building license.check.license_check.jar (); 0s disk-cache, multiplex-worker
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 34.964s, Critical Path: 2.55s
INFO: 17 processes: 12 internal, 4 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 17 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@github-actions
Copy link

The created documentation from the pull request is available at: docu-html

Integrated score_log under score-log feature with appropriate refactoring in the source code.
@prabakaranklst prabakaranklst force-pushed the prabakaran_integrate_score_log branch from 6d93f45 to c07aed8 Compare March 13, 2026 14:35

use kyron_foundation::prelude::{error, CommonErrors};
use crate::macros::k_log::*;
#[cfg(feature = "score-log")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there must be no ifdefs in code base. It shall be completely hidden from code base

},
Err(e) => {
error!("Error reading from mio object: {}", e);
k_error!("Error reading from mio object: {}", &format!("{}", e));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no strange names, shall be names as usual for log

fn fmt(
&self,
f: &mut dyn kyron_foundation::prelude::ScoreWrite,
spec: &kyron_foundation::prelude::FormatSpec,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export in such a way that original signature is kept. Look into lifecycle repo or persistency.


use crate::{
core::types::TaskId,
kore::types::TaskId,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kore?!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We get two errors as shown below for all the instances of not_recoverable_error!() in src/kyron/src/lib.rs. Because core::module_path and core::panic are used in score_log which is not available in our core. So, to avoid confusion, re-exporting such items now and future, changed our core to kore.

error[E0433]: failed to resolve: could not find module_path in core
--> src/kyron/src/lib.rs:158:9
|
158 | not_recoverable_error!("For now we don't allow runtime API to be called outside of runtime")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find module_path in core
|
= note: this error originates in the macro $crate::__log which comes from the expansion of the macro not_recoverable_error (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find panic in core
--> src/kyron/src/lib.rs:103:9
|
103 | not_recoverable_error!("For now we don't allow runtime API to be called outside of runtime")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find panic in core
|
= note: this error originates in the macro $crate::__log which comes from the expansion of the macro not_recoverable_error (in Nightly builds, run with -Z macro-backtrace for more info)

drop(_guard); // We need to drop the lock before going into IO wait

debug!("Parking on IO Driver with timeout: {:?}", timeout);
k_debug!("Parking on IO Driver with timeout: {:?}", &format!("{:?}", timeout));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why such splits with seeprate format, shall not be like that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We get error for not implementing the trait ScoreDebug for Duration and similarly for other types in other places. So, added format() for such instances.

error[E0277]: the trait bound Duration: kyron_foundation::prelude::ScoreDebug is not satisfied
--> src/kyron/src/scheduler/workers/worker_types.rs:165:13
|
165 | k_debug!("Parking on IO Driver with timeout: {:?}", timeout);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait kyron_foundation::prelude::ScoreDebug is not implemented for Duration
|
= help: the following other types implement trait kyron_foundation::prelude::ScoreDebug:
&T
&mut T
()
Arc
Box
FromUtf8Error
HashMap<K, V, S>
IoEventInterest
and 35 others
= note: required for Option<Duration> to implement kyron_foundation::prelude::ScoreDebug
note: required by a bound in kyron_foundation::prelude::score_log::score_log_fmt::Placeholder::<'a>::new
--> external/score_baselibs_rust+/src/log/score_log_fmt/fmt.rs:73:4
= note: this error originates in the macro $crate::format_args which comes from the expansion of the macro k_debug (in Nightly builds, run with -Z macro-backtrace for more info)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[Kyron] Integrate score_log from baselibs_rust into Kyron

2 participants